-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize more arrays below kmt #372
Initialize more arrays below kmt #372
Conversation
Running call_compute_subroutines with the intel compiler using the following FFLAGS: -g -O0 -init=snan,arrays crashed until I initialized several fields below the sea floor.
It would be useful to figure out what |
Also, there might be similar problems with the ciso code but we don't have a test for that |
Verified that using -finit-real=snan -ffpe-trap=invalid on the previous head of development causes the call_compute_subroutines test to crash but the code on the fix_uninit_mem branch (which eliminates unitialized values in the sinking particle type below the sea floor) runs successfully.
Verified this is sufficient to get @mvertens's test to pass |
It turns out that we need PON_remin=0, but none of the %remin(k) terms are used if k > column_kmt. Introduced marbl_interior_tendency_share_set_used_particle_terms_to_zero() to handle setting sflux_out(k) and hflux_out(k) to 0. Next commit will add calls to the same subroutine in ciso (which currently isn't tested for uninitialized memory)
Also added a comment to the else statement to make it clear which "if" it is tied to
In the last commit I added calls to the new share routine to set hflux_out and sflux_out below the sea floor for ciso sinking particles but I forgot to add the additional dzr_loc = c0 line that is already in the non-ciso code and it was caught by our CI scripts.
@klindsay28 as it turns out, the
And these are allocatable arrays. So when cheyenne is back up I'll add |
Testing on cheyenne with intel also showed that we need to intialize remin to 0 below kmt in marbl_interior_tendency_share_set_used_particle_terms_to_zero()
Per the previous comment, I tried running the stand-alone test with just
I tested that commit on cheyenne by running |
Running call_compute_subroutines with the intel compiler using the following
FFLAGS:
-g -O0 -init=snan,arrays
crashed until I initialized several fieldsbelow the sea floor.
Leaving this is draft status until @mvertens verifies that it fixes the error she was seeing.
Fixes #371